<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        //定时器
        let id1 = setTimeout(fun,1000);
        clearTimeout(id1);
        function fun(){
            alert("hello!!");
        }

        let id2 = setInterval(fun,1000);
        clearInterval(id2);

    </script>
</head>
<body>



</body>
</html>